
import DataCenterAPI from '../api/datacenter.js';

export const DataCenter={
   state:{
      coordinatelist:[],
   },
   mutations:{
      setCoordinateList(state,list){
          state.coordinatelist=list;
      },

   },
   actions:{
      loadCoordinateList(context,data){
          DataCenterAPI.getCoordinateByType(data).then(function(response){
              if(response.data.code==1){
                  context.commit('setCoordinateList',response.data.list);
              }
          })
      },
   },
   getters:{
      getCoordinateList:state =>{
         return state.coordinatelist;
      },

   }
}
